/**
 * 
 */
package view;

import java.io.PrintStream;

import javax.swing.JFrame;
import javax.swing.JTextArea;

import arbreAbstrait.Arbre;

/**
 * @author patrick-edouard
 *
 */
public class FenetreArbre extends JFrame{
	private JTextArea console = new JTextArea();
	private static final long serialVersionUID = 1L;

	public FenetreArbre()
	{
		super();
		this.initialiseFenetre();
	}
	public void initialiseFenetre()
	{
		this.setVisible(true);
		this.setSize(200, 200);
		this.console = new JTextArea();
		PrintStream out = new PrintStream( new ArbreConsole( this.console ) );
		System.setOut( out );
		this.getContentPane().add(this.console);
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		FenetreArbre fa = new FenetreArbre();
		Arbre a = new Arbre(9);
		for(int i=0; i<a.getTaille(); ++i)
		{
			a.setNoeud(i, i);
		}
		a.afficheArbre(1,0);
		
	}

}
